class Db:
    internals = {}
    @classmethod
    def get_file_by_file_id(cls, node, num, es):
        key = f'{node}!{num}'
        if key in cls.internals:
            return cls.internals[key]
        res = es.search(q=f"_id:{node}-{num}")
        hits = res['hits']['hits']
        if len(hits) > 0:
            cls.internals[key] = hits[0]['_source']
            return hits[0]['_source']
        return None
